import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description: 牛客网.简单题.数字颠倒
 */

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        //或 StringBuilder s = new StringBuilder(scanner.nextLine());
        StringBuffer s = new StringBuffer(scanner.nextLine());
        System.out.println((s.reverse()).toString());
    }
}

class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        String s = String.valueOf(n);
        for(int i = s.length() - 1; i >= 0; i--) {
            System.out.print(s.charAt(i));
        }
    }
}

class Main1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        StringBuilder s = new StringBuilder();
        int n = scanner.nextInt();
        if(n == 0){
            System.out.println('0');
            return;
        }
        while(n != 0){
            s.append((char)(n % 10 + '0'));
            n /= 10;
        }
        System.out.println(s.toString());
    }
}

public class Test {
}
